#include <iostream>
#include <memory>
#include "TCP_Server.hpp"

void usage(std::string proc){
    std::cout << "Usage: \n\t" << proc <<  " local_ip  local_port\n" << std::endl;
}

int main(int argc, char* argv[]){
    if(argc != 2){
        usage(argv[0]);
    }
    uint16_t port = std::stoi(argv[1]);

    std::unique_ptr<TcpServer> tsvr = std::make_unique<TcpServer>(port);
    tsvr->InitServer();
    tsvr->Loop();


    return 0;
}